import request from '@/utils/request'

// 查询新品上线列表
export function listNew(query) {
  return request({
    url: '/admin/goods/goodsNew/list',
    method: 'get',
    params: query
  })
}

// 查询新品上线详细
export function getNew(id) {
  return request({
    url: '/admin/goods/goodsNew/' + id,
    method: 'get'
  })
}

// 新增新品上线
export function addNew(data) {
  return request({
    url: '/admin/goods/goodsNew',
    method: 'post',
    data: data
  })
}

// 修改新品上线
export function updateNew(data) {
  return request({
    url: '/admin/goods/goodsNew',
    method: 'put',
    data: data
  })
}

// 删除新品上线
export function delNew(id) {
  return request({
    url: '/admin/goods/goodsNew/' + id,
    method: 'delete'
  })
}
